import request from '@/utils/request.js'; // 引入封装的方法
// import { APPID } from '@/utils/config.js';


// 获取短信验证码
export function getSmsCode(data) {
	return request({
	    url: "/common/getSmsCode",
	    method: "post",
	    data,
	  });
}

// 查询级联地区
export function getCascadeRegion(data) {
	return request({
	    url: "/common/getCascadeRegion",
	    method: "get",
	    data,
		isShowLoading:false,
	  });
}
 
 // 查询国籍字典
 export function getDictCountry(data) {
 	return request({
 	    url: "/common/getDictCountry",
 	    method: "get",
 	    data,
		isShowLoading:false,
 	  });
 }
 
 
// 查询手机号国码
export function getPhoneCountryCode(data) {
	return request({
	    url: "/common/getPhoneCountryCode",
	    method: "get",
	    data,
	});
}
export function uploadImage(params) {
	const formData = new FormData();
	formData.append("file", params.file);
	formData.append("type", params.type);
	return request.post('/common/upload/image',formData);
}

export const uploadImg = "/common/upload/image";

/**
 * 获取邮件验证码
 * @param {Object} data
 */
export function getEmailCode(data) {
	return request({
	    url: "/common/getEmailCode",
	    method: "post",
	    data,
	});
}
/**
 * 检查版本更新
 * @param {Object} data
 */
export function checkAppVersion(data) {
	return request({
	    url: "/common/checkAppVersion",
	    method: "post",
	    data,
	});
}

/**
 * 查询分享海报
 * @param {Object} data
 */
export function getSharePoster(data) {
	return request({
	    url: "/common/getSharePoster",
	    method: "get",
	    data,
	});
}

/**
 * 生成分享海报
 * @param {Object} data
 */
export function generateSharePoster(data) {
	return request({
	    url: "/common/generateSharePoster",
	    method: "get",
	    data,
	});
}
